<%@ page language="java" import="java.util.*" pageEncoding="utf-8"
	isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
    String path = request.getContextPath();
			String basePath = request.getScheme() + "://"
					+ request.getServerName() + ":" + request.getServerPort()
					+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>

<script type="text/javascript" src="<%=request.getContextPath()%>/easyui/jquery.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/easyui/locale/easyui-lang-zh_CN.js"></script>
<link href="<%=request.getContextPath()%>/easyui/themes/default/easyui.css" rel="stylesheet" type="text/css" />
<link href="<%=request.getContextPath()%>/easyui/themes/icon.css" rel="stylesheet" type="text/css" />
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-2.1.4.min.js"></script>
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/jPages.css">
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/animate.css">
<script src="<%=request.getContextPath()%>/js/jquery-1.8.2.min.js"></script>
<script src="<%=request.getContextPath()%>/js/jPages.js"></script>
<script type="text/javascript">
$(function(){  
	$("div.holder").jPages({  
	  containerID : "item", 
	  first:"首页", 
	  previous : "上一页",  
	  next : "下一页",
	  last:"尾页",  
	  perPage : 10,  
	  //delay : 100,
	  //动画效果
	  //animation:"bounceInLeft"
	});  
 });  
</script>
<script type="text/javascript">
$(document).ready(function(){
  $(".click").click(function(){
 	 $(".tip").fadeIn(200);
  });
  
  $(".sure").click(function(){
 	 $(".tip").fadeOut(100);
  });

  $(".cancel").click(function(){
	  $(".tip").fadeOut(100);
	  $(".jiefeng").fadeOut(100);
  });
});
</script>
</head>

<body>
	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><ema href="javascript:void">首页</em></li>
			<li><ema href="javascript:void">用户管理</em></li>
			<li><ema href="javascript:void">企业用户列表</em></li>
			<li><ema href="javascript:void">企业服务情况</em></li>
		</ul>
	</div>
	<div class="rightinfo">
		<div class="tools">
			<form  style="    font-size: 16px;" action="<%=request.getContextPath()%>/selectEntUserOrderList" method="post" name="serch">
				<td class="zi">服务时间：</td>
				<td><input type="date" name="startTime" style="    height: 20px; border:1px solid red;"/>至<input type="date" name="endTime" style=" height: 20px; border:1px solid red;"/></td>
				<td class="zi">服务类型：</td>
				<td><select name="server_type" class="selector">
								<option selected="selected" value="">请选择类型</option>
								<option value="劳务">劳务</option>
								<option value="咨询">咨询</option>
								<option value="陪护">陪护</option>
						</select></td>
				<td class="zi">员工：</td>
				<td><input type="text" id="staff_id" name="staff_id" style="    height: 20px; border:1px solid red;"/></td>
				<td class="zi">城市：</td>
				<td><input type="text" id="addres" name="addres" style="    height: 20px;border:1px solid red;"/></td>
				<td class="zi">性别：</td>
				<td><select name="gender" style="width: 90px;height: 24px;">
								<option selected="selected"  value="">请选择</option>
								<option value="1">男</option>
								<option value="0">未知</option>
								<option value="2">女</option>
						</select></td>
			
			<div class="toolbar1">
				<table>
					<tr style="border: 0px ">
						<td><input type="submit" value="查询" class="button" /></td>
					</tr>
				</table>
			</div>
			</form>
		</div>
		<table class="tablelist">
			<thead>
				<tr>
					<th>订单编号</th>
					<th>服务员工</th>
					<th>性别</th>
					<th>手机号</th>
					<th>服务类型</th>
					<th>服务子类型</th>
					<th>预约人</th>
					<th>手机号</th>
					<th>预约时间</th>
					<th>开始服务时间</th>
					<th>服务完成时间</th>
					<th>服务地点</th>
					<th>金额</th>
					<th>打赏</th>
					<th>订单状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody class="tb" id="item">
				<c:forEach items="${lists}" var="data">
					<tr>
						<td>${data.order_id} </td>
						<td>${data.username}</td>
						<td>	<c:if test="${data.gender == 1}">男</c:if>
							<c:if test="${data.gender == 2}">女</c:if>
							<c:if test="${data.gender == 0}">未知</c:if></td>
						<td>${data.mobile}</td>
							<td>
						${data.server_type}
						</td>
						<td>${data.server_sub_type}</td>
						<td>${data.prename}
						</td>
						<td>
							${data.premobile}
						</td>
 						<td>${data.create_time }</td>
						<td>${data.server_time}</td>
						<td>${data.end_time}</td>
						<td>${data.server_address}</td>
						<td>￥${data.reality_price}</td>
						<td>￥${data.give_reward==null? '0':data.give_reward}</td>
						<td>${data.status}</td>
						<td>
							<ul class="toolbar"style=" margin-left: 49px;">
						<li style="width: 33px;"><a style=" margin-left: 9px;"href="<%=request.getContextPath()%>/selectOrderList?id=${data.id}&enter=enter" >查看</a></li>
						<%-- <li style="margin-left: 20px; width: 93px;"><a style=" margin-left: 9px;"href="/htx-backer/selectCompanyList?userid=${data.id}" >通过审核</a></li> --%>
						</ul>
						</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
		<div style="clear:both;"></div>
		<!-- 分页的页码 -->
		<div class="holder"></div>
		共${nums}条记录
		
	</div>
	<script type="text/javascript">
	
	 $(".exportExcel").click(function(){
		 window.location.href = "<%=request.getContextPath()%>/enterpriseExportExcel";
	 })
	 
		$('.tablelist tbody tr:odd').addClass('odd');

	  function update(a){
		  var text = $(a).text();
		  var statu = "";
		  if(text == "封号"){
			  $(".tip").fadeIn(500);
			  statu = "0";
		  }else if(text == "解封"){
			  $(".jiefeng").fadeIn(500);
			  statu = "1";
		  }
		  $(".sure").click(function(){
			  var username = $(a).parent().parent().parent().parent().find("input[name=username]").val();
			var params = $(a).parent().parent().parent().parent().find("input[name=userid]").val()+ "," + statu + "," + username;;
			params+=",enter"; 
			window.location.href="<%=request.getContextPath()%>/updateUserStatu?params="+params;
	     });
	  }
	</script>
	
</body>
</html>
